/**
 * 头部菜单数据列表
 */
import { findHeadCategory } from '@/api/home'
export default {
  namespaced: true,
  state: {
    list: [] // 分类列表
  },
  mutations: {
    setList (state, payload) {
      state.list = payload
    }
  },
  actions: {
    async getList ({ commit }) {
      const { result } = await findHeadCategory()
      // console.log('菜单数据列表: ', result)
      commit('setList', result)
    }
  }
}
